home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / enigma / earcd / emula / arosdv19.lha / AROS / dos / remdosentry.c < prev    next >
C/C++ Source or Header  |  1996-10-24  |  2KB  |  84 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: remdosentry.c,v 1.4 1996/10/24 15:50:35 aros Exp $
  4.     $Log: remdosentry.c,v $
  5.     Revision 1.4  1996/10/24 15:50:35  aros
  6.     Use the official AROS macros over the __AROS versions.
  7.  
  8.     Revision 1.3  1996/08/13 13:52:50  digulla
  9.     Replaced <dos/dosextens.h> by "dos_intern.h" or added "dos_intern.h"
  10.     Replaced AROS_LA by AROS_LHA
  11.  
  12.     Revision 1.2  1996/08/01 17:40:57  digulla
  13.     Added standard header for all files
  14.  
  15.     Desc:
  16.     Lang: english
  17. */
  18. #include <dos/dosextens.h>
  19. #include <clib/utility_protos.h>
  20.  
  21. /*****************************************************************************
  22.  
  23.     NAME */
  24.     #include <clib/dos_protos.h>
  25.  
  26.     AROS_LH1(LONG, RemDosEntry,
  27.  
  28. /*  SYNOPSIS */
  29.     AROS_LHA(struct DosList *, dlist, D1),
  30.  
  31. /*  LOCATION */
  32.     struct DosLibrary *, DOSBase, 112, Dos)
  33.  
  34. /*  FUNCTION
  35.     Removes a given dos list entry from the dos list. Automatically
  36.     locks the list for writing.
  37.  
  38.     INPUTS
  39.     dlist - pointer to dos list entry.
  40.  
  41.     RESULT
  42.     !=0 if all went well, 0 otherwise.
  43.  
  44.     NOTES
  45.     Since anybody who wants to use a device or volume node in the
  46.     dos list has to lock the list, filesystems may be called with
  47.     the dos list locked. So if you want to add a dos list entry
  48.     out of a filesystem don't just wait on the lock but serve all
  49.     incoming requests until the dos list is free instead.
  50.  
  51.     EXAMPLE
  52.  
  53.     BUGS
  54.  
  55.     SEE ALSO
  56.  
  57.     INTERNALS
  58.  
  59.     HISTORY
  60.     29-10-95    digulla automatically created from
  61.                 dos_lib.fd and clib/dos_protos.h
  62.  
  63. *****************************************************************************/
  64. {
  65.     AROS_LIBFUNC_INIT
  66.     AROS_LIBBASE_EXT_DECL(struct DosLibrary *,DOSBase)
  67.     struct DosList *dl;
  68.  
  69.     dl=LockDosList(LDF_ALL|LDF_WRITE);
  70.     for(;;)
  71.     {
  72.         if(dl->dol_Next==dlist)
  73.     {
  74.         dl->dol_Next=dlist->dol_Next;
  75.         break;
  76.     }
  77.     dl=dl->dol_Next;
  78.     }
  79.     UnLockDosList(LDF_ALL|LDF_WRITE);
  80.  
  81.     return 1;
  82.     AROS_LIBFUNC_EXIT
  83. } /* RemDosEntry */
  84.